/*
 * @Author: byron
 * @Date: 2021-09-21 16:56:56
 * @LastEditTime: 2021-09-21 17:28:21
 */

import { INCREMENT, DECREMENT } from "./constant";

// 普通函数写法
// export function createIncrementAction(data) {
//     return {type:'increment',data}
// }
// export function createDecrementAction(data) {
//     return {type:'decrement',data}
// }

//箭头函数写法
export const createIncrementAction = (data) => ({ type: INCREMENT, data });
export const createDecrementAction = (data) => ({ type: DECREMENT, data });
